#ifndef __APP_CLOCK_H__
#define __APP_CLOCK_H__

#include "stdint.h"
#include "nrf_log.h"

#define CLOCK_CB_FLAG_1SECOND   5
#define CLOCK_CB_FLAG_1MINUTE   6
#define CLOCK_CB_FLAG_15MINUTE  7
#define CLOCK_CB_FLAG_1HOUR     8
#define CLOCK_CB_FLAG_1DAY      9

#define CLOCK_SUCCESS           0
#define CLOCK_ERROR             1

typedef struct {
    uint16_t year;
    uint8_t month;
    uint8_t day;
    uint8_t hour;
    uint8_t minute;
    uint8_t second;
    uint8_t day_of_week;
} clock_time_t;

/* 时钟初始化 */
uint8_t User_clock_init(void);

/* 获取时间API */
clock_time_t* Get_Clock_time(void);

/* 设置时间API */
void Set_Clock_time(clock_time_t* p_time);

#endif //__APP_TIME_H__
